#ifndef __SkeletonSerializer_H__
#define __SkeletonSerializer_H__

#include "d3dheaders.h"
#include <fstream>
#include <string>

namespace KEngine
{

class Skeleton;
class SkeletalAnimation;
class SkeletonSerializer
{
public:
	SkeletonSerializer();
	virtual ~SkeletonSerializer();

	bool loadSkeleton(const char* filename, Skeleton* skeleton);
	bool loadSkeletalAnimation(const char* filename, SkeletalAnimation* skeletalAnim);

protected:
	void importGlobalInfo();
	void importBoneList(Skeleton* skeleton);
	void importSkeletalAnim(SkeletalAnimation* skeletalAnim);
	void importMatrix(D3DXMATRIX& m);

protected:
	std::ifstream infile;
	std::string token;
};

}

#endif 